home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14462 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.luc.edu!user
  2. From: VArase@varase.it.luc.edu (Verne Arase)
  3. Newsgroups: comp.lang.c,comp.unix.programmer
  4. Subject: Re: Q: '\n' character
  5. Date: Sun, 14 Apr 1996 21:03:22 -0500
  6. Organization: LUMC
  7. Message-ID: <AD97189A966891F2@mcdiala02.it.luc.edu>
  8. References: <4kj66f$k0o@ren.cei.net> <4kko80$8np@news.ld.centuryinter.net> <4kkvvsINN8fs@keats.ugrad.cs.ubc.ca> <4kmdsv$ojc@masala.cc.uh.edu> <4kmhpsINN7ak@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: 147.126.240.102
  10.  
  11. In article <4kmhpsINN7ak@keats.ugrad.cs.ubc.ca>,
  12. c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) wrote:
  13.  
  14.  >Humor me as to why it is necessary to retain a whole string of data just
  15. to
  16.  >then scan through it to find its length to remove the trailining newline,
  17.  >which was put there by a standard library function that already scanned
  18. the
  19.  >characters once to _find_ the newline in the first place.
  20.  
  21. This is a failing of the C standard I/O library; fgets() _ought_ to have
  22. returned the length read.
  23.  
  24. ---
  25. The above are my own opinions, and not those of my employer.
  26.